$.extend( jQuery.fn.gridExt.sortRule, {

    "server" : function(a){
        return parseInt(a.replace( "S", "" ).toLowerCase());
    },
    
    "int" : function(a){
        return parseInt(a.replace( ",", "" ));
    },

    "numeric" : function(a){
        return parseFloat(a.replace( ",", "" ));
    },

    "inHtml" : function(a){
        var re = new RegExp("<.*>(.*)<.*>"),
            result = a.match(re),
            str = result[1];
        return str.toLowerCase();
    },

    "percent" : function(a){
        var result = parseFloat(a.replace( "%", "" ));
        return result;
    },

    "inHtmlInt" : function(a){
        var re = new RegExp("<.*>(.*)<.*>"),
            result = a.match(re),
            str = result[1];
        return parseInt(str.toLowerCase());
    },

    "outHtml" : function(a){
        return a.replace(/<.*>(.*)<.*>/, "");
    },

    "brackets" : function(a){
        return a.replace( "(", "" ).replace( ")", "" );
    },
    
    "inHtmlFloatPercent" : function(a){
        var re = new RegExp("<.*>(.*)\%<.*>"),
            result = a.match(re),
            str = result[1];
        return parseFloat(str.toLowerCase());
    },

    "inHtmlFloatPercentBrackets" : function(a){
        var re = /.*\s*<.*>\((.*)\%\)<.*>/
        var result = a.match(re)
        var str =  (result == null)?-1:result[1] ;
        return parseFloat(str);
    }

});